package it.mozzicato.apkwizard.utils;

/**
 * @author Roberto Mozzicato
 *
 */
public class EnumUtils {
	public static <E extends DescriptionEnum> E getEnumFromDescription(String desc, E[] descriptions) {
		if(desc != null && descriptions != null) {
			for (E descEnum : descriptions) {
				if(descEnum.getDescription().equals(desc))
					return descEnum;
			}
		}
		
		return null;
	}
}
